Integrand size = 38, antiderivative size = 47 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} a (B+2 C) x+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a B \cos (c+d x) \sin (c+d x)}{2 d} \]
Time = 0.07 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.94 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a (2 B c+2 B d x+4 C d x+4 (B+C) \sin (c+d x)+B \sin (2 (c+d x)))}{4 d} \]
Time = 0.48 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 4560, 3042, 4484, 25, 3042, 4274, 24, 3042, 3117}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a \sec (c+d x)+a) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \cos ^2(c+d x) (a \sec (c+d x)+a) (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {a B \sin (c+d x) \cos (c+d x)}{2 d}-\frac {1}{2} \int -\cos (c+d x) (2 a (B+C)+a (B+2 C) \sec (c+d x))dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) (2 a (B+C)+a (B+2 C) \sec (c+d x))dx+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {2 a (B+C)+a (B+2 C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {1}{2} (2 a (B+C) \int \cos (c+d x)dx+a (B+2 C) \int 1dx)+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{2} (2 a (B+C) \int \cos (c+d x)dx+a x (B+2 C))+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (2 a (B+C) \int \sin \left (c+d x+\frac {\pi }{2}\right )dx+a x (B+2 C)\right )+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {1}{2} \left (\frac {2 a (B+C) \sin (c+d x)}{d}+a x (B+2 C)\right )+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}\) |
3.4.11.3.1 Defintions of rubi rules used
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.17 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.89
method | result | size |
parallelrisch | \(\frac {\left (\frac {B \sin \left (2 d x +2 c \right )}{2}+\left (2 B +2 C \right ) \sin \left (d x +c \right )+\left (B +2 C \right ) x d \right ) a}{2 d}\) | \(42\) |
risch | \(\frac {a B x}{2}+a x C +\frac {a B \sin \left (d x +c \right )}{d}+\frac {\sin \left (d x +c \right ) C a}{d}+\frac {a B \sin \left (2 d x +2 c \right )}{4 d}\) | \(51\) |
derivativedivides | \(\frac {a B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )+C a \sin \left (d x +c \right )+C a \left (d x +c \right )}{d}\) | \(57\) |
default | \(\frac {a B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )+C a \sin \left (d x +c \right )+C a \left (d x +c \right )}{d}\) | \(57\) |
norman | \(\frac {\frac {a \left (B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {a \left (3 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (B +2 C \right ) x}{2}-\frac {2 a B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}+\frac {2 a B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {4 a \left (B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {a \left (B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-a \left (B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-a \left (B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {a \left (B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}+\frac {a \left (B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{2}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}\) | \(240\) |
Time = 0.24 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.81 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (B + 2 \, C\right )} a d x + {\left (B a \cos \left (d x + c\right ) + 2 \, {\left (B + C\right )} a\right )} \sin \left (d x + c\right )}{2 \, d} \]
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a \left (\int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]
a*(Integral(B*cos(c + d*x)**3*sec(c + d*x), x) + Integral(B*cos(c + d*x)** 3*sec(c + d*x)**2, x) + Integral(C*cos(c + d*x)**3*sec(c + d*x)**2, x) + I ntegral(C*cos(c + d*x)**3*sec(c + d*x)**3, x))
Time = 0.22 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.17 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a + 4 \, {\left (d x + c\right )} C a + 4 \, B a \sin \left (d x + c\right ) + 4 \, C a \sin \left (d x + c\right )}{4 \, d} \]
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*B*a + 4*(d*x + c)*C*a + 4*B*a*sin(d* x + c) + 4*C*a*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (43) = 86\).
Time = 0.29 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.98 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (B a + 2 \, C a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*((B*a + 2*C*a)*(d*x + c) + 2*(B*a*tan(1/2*d*x + 1/2*c)^3 + 2*C*a*tan(1 /2*d*x + 1/2*c)^3 + 3*B*a*tan(1/2*d*x + 1/2*c) + 2*C*a*tan(1/2*d*x + 1/2*c ))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 15.54 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.06 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {B\,a\,x}{2}+C\,a\,x+\frac {B\,a\,\sin \left (c+d\,x\right )}{d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]